using System;
namespace Framework
{
    public class FrameworkLog
    {
        private static ILogger logger = new DebugLogger();
        public static void SetLogger(ILogger logger)
        {
            FrameworkLog.logger = logger;
        }
        [System.Diagnostics.Conditional("LogError")]
        public static void LogErrorFormat(string format, params object[] args)
        {
            logger?.LogErrorFormat(format, args);
        }
        [System.Diagnostics.Conditional("LogError")]
        public static void LogError(object message)
        {
            logger?.LogError(message);
        }
        [System.Diagnostics.Conditional("Log")]
        public static void LogFormat(string format, params object[] args)
        {
            logger?.LogFormat(format, args);
        }
        [System.Diagnostics.Conditional("Log")]
        public static void Log(object message)
        {
            logger?.Log(message);
        }
        [System.Diagnostics.Conditional("LogWarning")]
        public static void LogWarning(object message)
        {
            logger?.LogWarning(message);
        }
        [System.Diagnostics.Conditional("LogWarning")]
        public static void LogWarningFormat(string format, params object[] args)
        {
            logger?.LogWarningFormat(format, args);
        }
        public static void Update()
        {
            logger?.Update();
        }
    }
}